<template>
    <div>
        <van-nav-bar
            :fixed="true"
            :title="title"
            left-text="返回"
            left-arrow
            :placeholder="true"
            @click-left="$router.go(-1)"
        />
        <div class="content">
            <div class="top">
                <img :src="brand.app_list_pic_url" alt="" />
                <div class="top_title">{{ title }}</div>
            </div>
            <div class="footer">
                <p>{{ brand.simple_desc }}</p>
            </div>
        </div>
    </div>
</template>

<script>
import { GetBrandDetail } from "@/request/api";
export default {
    data() {
        return {
            brand: {}, //获取的列表数据
            title: "", //标题
        };
    },
    created() {
        console.log(this.$route.params.id);
        GetBrandDetail({ id: this.$route.params.id }).then((res) => {
            console.log(res);
            this.brand = res.data.data.brand;
            this.title = res.data.data.brand.name;
        });
    },
};
</script>
 
<style lang = "less" scoped>
.content {
    .top {
        position: relative;
        img {
            width: 100%;
            height: 200px;
        }
        .top_title {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            font-size: 20px;
            color: #fff;
            text-decoration: underline;
        }
    }
    .footer {
        font-size: 18px;
        padding: 20px 2%;
        background: #fff;
        color: #666;
        text-align: center;
        p {
            line-height: 25px;
        }
    }
}
</style>